<?php
// +----------------------------------------------------------------------
// | ThinkPHP [ WE CAN DO IT JUST THINK ]
// +----------------------------------------------------------------------
// | Copyright (c) 2006~2018 http://thinkphp.cn All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
// +----------------------------------------------------------------------
// | Author: liu21st <liu21st@gmail.com>
// +----------------------------------------------------------------------

    use think\facade\Request;
    use think\facade\Route;

    /* 演示环境禁止操作路由绑定 */
/*    if (stripos(Request::host(true), 'tp5.1.com') !== false) {

        $arr=[
            'admin/menu/addMenu',
            'admin/menu/del',
            'admin/role/addRole',
            'admin/role/del',
            'admin/log/del',
            'admin/index/lockPass',
            'admin/databack/export',
            'admin/databack/del',
            'admin/common/changeStatus',
            'admin/admin/addUser',
            'admin/admin/del',
            'admin/setting/index',
            'admin/setting/pass',
            'admin/setting/safe',
            'admin/setting/emailPost',
            'admin/setting/sitePost',
            'admin/setting/del',
        ];

        foreach ($arr as $v){
            Route::post($v, function () {
                return json(['code' => 0, 'msg' => '演示环境禁止操作！']);
            });
        }

        Route::get('admin/databack/import', function () {
            return json(['code' => 0, 'msg' => '演示环境禁止操作！']);
        });
        Route::get('admin/databack/del', function () {
            return json(['code' => 0, 'msg' => '演示环境禁止操作！']);
        });

    }*/
